package com.education.platform.common.exception;

import com.education.platform.common.web.ResponseCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 业务异常类
 */
@Getter
@Setter
@ToString
public class BusinessException extends RuntimeException {

    private Integer code;

    public BusinessException(String message) {
        super(message);
        this.code = ResponseCode.BUSINESS_FAIL.getCode();
    }

    public BusinessException(String message, Integer code) {
        super(message);
        this.code = code;
    }

}
